package org.okkam.refine.strategy;
    
    
    import java.util.List;
import org.okkam.client.data.AttributeType;
import org.okkam.refine.strategy.AddressCandidate;
import org.okkam.refine.strategy.ArtifactCandidate;
import org.okkam.refine.strategy.CandidateStrategy;
import org.okkam.refine.strategy.LocationCandidate;
import org.okkam.refine.strategy.OrganizationCandidate;
import org.okkam.refine.strategy.PersonCandidate;
import org.okkam.refine.strategy.ToponymCandidate;
    
    public class CandidateContext {
    
        private CandidateStrategy strategy = null;
    
        public void setPersonSelect() {
            this.strategy = new PersonCandidate();
        }
    
        public void setLocationSelect() {
            this.strategy = new LocationCandidate();
        }
    
        public void setToponymSelect() {
            this.strategy = new ToponymCandidate();
        }
    
        public void setAddressSelect() {
            this.strategy = new AddressCandidate();
        }
    
        public void setOrganizationSelect() {
            this.strategy = new OrganizationCandidate();
        }
    
        public void setArtifactSelect() {
            this.strategy = new ArtifactCandidate();
        }
        
        public void setOtherSelect() {
            this.strategy = new OtherCandidate();
        }
        
        public void setGenericSelect() {
            this.strategy = new GenericCandidate();
        }
    
        public boolean checkEquality(List<AttributeType> attributeTypeList, List<String> entityList) {
    
            boolean result = false;
    
            if (strategy != null) {
                result = strategy.checkEquality(attributeTypeList, entityList);
            } else {
                System.out.println("Select the type of entities!");
            }
    
            return result;
    
        }
    
    }
